<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a="http://richfaces.org/a4j"
    template="/layout/template.xhtml">

<ui:define name="body">

<a:loadScript src="../js/jquery.maskedinput-1.3.js" />

<script>  
jQuery(function($){  
$("input[id$='cargoForm:valorTaxaInscicaoField:valorTaxaInscicaoID'").mask("(999 9999-9999)");
});  
</script>  
    <h:form id="cargoForm">

        <rich:panel>
            <f:facet name="header">Cadastro de Cargo</f:facet>

            <s:decorate id="concursoField" template="/layout/edit.xhtml">
                <ui:define name="label">Concurso</ui:define>
                <h:selectOneMenu value="#{cargoHome.instance.concurso}">
	                 <s:selectItems value="#{concursoList.resultList}" var="_iten" itemValue="#{_iten}" itemLabel="#{_iten.nome}" label="#{_iten.nome}" hideNoSelectionLabel="true"/>
	                 <s:convertEntity/>
                </h:selectOneMenu>
            </s:decorate>
            
            <s:decorate id="codigoField" template="/layout/edit.xhtml">
                <ui:define name="label">Codigo</ui:define>
                <h:inputText id="nome" required="true"
                             value="#{cargoHome.instance.codigo}"  size="4" maxlength="3"/>
            </s:decorate>
            
            <s:decorate id="nameField" template="/layout/edit.xhtml">
                <ui:define name="label">Nome</ui:define>
                <h:inputText id="nome" required="true"
                             value="#{cargoHome.instance.nome}" size="60" maxlength="50"/>
            </s:decorate>

            <s:decorate id="valorTaxaInscicaoField" template="/layout/edit.xhtml">
                <ui:define name="label">Valor Taxa Inscricao</ui:define>
                <h:inputText id="valorTaxaInscicaoID" required="true"
                             value="#{cargoHome.instance.valorTaxaInscicao}" size="60" maxlength="50" />
            </s:decorate>

            <div style="clear:both"/>

        </rich:panel>

        <div class="actionButtons">
            <h:commandButton id="save"
                          value="Salvar"
                         action="#{cargoHome.persist}"
                       rendered="#{!cargoHome.managed}"/>
            <h:commandButton id="update"
                          value="Save"
                         action="#{cargoHome.update}"
                       rendered="#{cargoHome.managed}"/>
            <h:commandButton id="delete"
                          value="Excluir"
                         action="#{cargoHome.remove}"
                      immediate="true"
                       rendered="#{cargoHome.managed}"/>
            <s:button propagation="end"
                               id="cancel"
                            value="Cancelar"
                             view="/modulo/cargoList.xhtml"/>
        </div>

    </h:form>

</ui:define>

</ui:composition>
